package com.hectopascal.goalance.controller;

import com.hectopascal.goalance.pojo.Performance;
import com.hectopascal.goalance.pojo.dto.ResponseMessage;
import com.hectopascal.goalance.service.Ipml.IPerformanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/performance")
public class PerformanceController {
    @Autowired
    IPerformanceService performanceService;

    @GetMapping("/getperformance")
    public ResponseMessage<Performance> performanceGet(@RequestParam Integer userId,
                                                       @RequestParam (required = false) String month) {
        Performance performance = performanceService.performanceGet(userId, month);
        return new ResponseMessage(200, "获取绩效数据成功", performance);
    }
}
